{% extends 'SonataAdminBundle:CRUD:base_list_field.html.twig' %}

{% block field %}
<a{% if object.newMessagesCount != 0 %} style="color: red;"{% endif %} href="{{ path('admin_user_messages', {'loginName': object.loginName}) }}">{{ object.newMessagesCount }} Messages</a>
{% endblock %}